package cz.proks.easyhelpdesk.gwt.ui;

import java.util.Collection;
import java.util.Map;

import cz.proks.easyhelpdesk.api.model.Category;
import cz.proks.easyhelpdesk.api.model.Helpdesk;
import cz.proks.easyhelpdesk.api.model.HelpdeskRole;
import cz.proks.easyhelpdesk.api.model.User;
import cz.proks.easyhelpdesk.gwt.ui.base.RestrictedHelpdeskView;

public interface SettingsView extends RestrictedHelpdeskView {    
    void setPresenter(Presenter presenter);
            
    void setCurrentHelpdesk(Helpdesk heldpesk);    
    void setHelpdeskUsers(Map<User, Boolean> users);
    void setMembersRoles(Map<User, HelpdeskRole> memberRoles);
    void setHelpdeskRoles(Collection<HelpdeskRole> helpdeskRoles);       
    void setAddMemberId(String userId);
    void setAddCategoryLabel(String label);
    void setCategories(Collection<Category> categories);        
    
    void showSettingsButton(boolean showButton);
    
    interface Presenter {
        void changeSettingsHeldpesk(Helpdesk helpdesk);
        
        void saveHelpdeskMember(Helpdesk helpdesk, User user, HelpdeskRole role);
        void deleteHelpdeskMember(Helpdesk helpdesk, User user);
        void updateMemberRole(User user, HelpdeskRole role);
        
        void saveCategory(Category category);
        void deleteCategory(Category category);
    }
}